<?php
/**
 * NAME: topic
 * WHEN: OnTopic OnMsg
 * PROVIDES: NONE
 * AUTOLOAD: true
 * DESCRIPTION: Moduł zarządzający topikiem i nadpisujacy zmieniony topicu nawet przez operatorow kanalu.
 * VERSION: 0.1
 * UPDATE: http://update.tempaq2.blacksoft.eu/check.php
 * AUTHOR: blacksoft.eu
 */
 
 exit();
 
//*function_start
	if ($data->type!==512) {
		if ($this->is_admin($data->nick)) {
			if ($d[0] == '!topic_lock') {
				if (!empty($d[1])) {
					$topic = substr($data->message, strlen($d[0])+1);
					$irc->setTopic($data->channel, 	$topic);
				} else {
					$topic = $this->gettopic($data->channel);
				}
				$this->topic_lock = $topic;
			} else if ($d[0]=='!topic_unlock') {
				$this->topic_lock = null;
			} else if ($d[0]=='!topic') {
				if ($this->topic_lock==null)
					$irc->setTopic($data->channel, substr($data->message, strlen($d[0])+1));
			}
		}
	} else if ($this->topic_lock!==null&&($data->nick!==$irc->_nick)) {
		$irc->setTopic($data->rawmessageex[2], $this->topic_lock);
	}
//*function_end	
?>